package com.voto.sunflower.activity.me;

import retrofit.RetrofitError;
import retrofit.client.Response;

import com.voto.sunflower.model.response.UserResponse;
import com.voto.sunflower.retrofit.NetworkHandler;

public class UpdateMeCallback extends NetworkHandler<UserResponse> {

	private UpdateMeListener mUpdateMeListener;

	@Override
	public void failure(RetrofitError arg0) {
		super.failure(arg0);
		mUpdateMeListener.failure(arg0);
	}

	@Override
	public void success(UserResponse arg0, Response arg1) {
		super.success(arg0, arg1);
		mUpdateMeListener.sucess(arg0, arg1);
	}
	
	public void setListener(UpdateMeListener updateMeListener){
		mUpdateMeListener = updateMeListener;
	}
	
	public interface UpdateMeListener{
		public void failure(RetrofitError arg0);
		public void sucess(UserResponse arg0, Response arg1);
	}
}
